package com.ebt.m.wiki;

import android.os.Bundle;
import android.view.View;
import android.widget.PopupWindow;

import com.ebt.m.R;
import com.ebt.m.fragment.LazyFragment;
import com.ebt.m.wiki.view.ClauseWebView;

/**
 * @author
 * @description 产品-险种条款
 */
public class FrgProductClause extends LazyFragment {
    private ClauseWebView mWebView;

    private String[] mClauseRelatedPath;

    public static FrgProductClause newInstance(String[] mClauseRelatedPath) {
        FrgProductClause frg = new FrgProductClause();
        Bundle bundle = new Bundle();
        bundle.putSerializable("data", mClauseRelatedPath);
        frg.setArguments(bundle);
        return frg;
    }

    @Override
    protected void onCreateViewLazy(Bundle savedInstanceState) {
        super.onCreateViewLazy(savedInstanceState);
        View rootView = inflater.inflate(R.layout.wiki_frg_product_clause, null);
        mWebView = (ClauseWebView) rootView.findViewById(R.id.wiki_tab3_webview);
        setContentView(rootView);
        onDataSyncPost();
    }

    @Override
    protected void onDataSyncStart() {
        super.onDataSyncStart();
        Bundle bundle = getArguments();
        mClauseRelatedPath = bundle.getStringArray("data");
        mWebView.setData(mClauseRelatedPath, false);
    }

    public PopupWindow getPop() {
        return mWebView.getmPopupWindow();
    }
}
